package com.acme.domain.email;

import java.util.LinkedList;
import java.util.List;

public class Queue {
    List<Email> mails = new LinkedList<>();

    public void addEmail(Email email) {
        mails.add(email);
    }

    public void close() {

    }

    public Email getEmail() {
        if (mails.size() > 0) {
            return mails.get(0);
        } else {
            return null;
        }
    }
}